Release 10.1A: OpenEdge Development:
Messaging and ESB


subscribe procedure

Subscribes to a topic.

Syntax

PROCEDURE subscribe. 
DEFINE INPUT PARAMETER topicName AS CHARACTER. 
DEFINE INPUT PARAMETER subscriptionName AS CHARACTER.  
DEFINE INPUT PARAMETER messageSelector AS CHARACTER.    
DEFINE INPUT PARAMETER noLocalPublications AS LOGICAL.  
DEFINE INPUT PARAMETER messageConsumer AS HANDLE.  

Parameters

topicName

The topic to which the procedure subscribes.

subscriptionName

A subscriptionName parameter with a value other than UNKNOWN specifies a durable subscription. Durable subscriptions require that the JMS client have a client ID identifier; the client must call setClientID in the pubsubsession.p object (or set the default client ID on the server side). If the subscriptionName value is UNKNOWN or an empty string, the subscription is not durable.

messageSelector

A message selector (optional).

noLocalPublications

A Boolean flag controlling whether the application receives its own messages (optional). The default is FALSE (the session receives its own publications).

messageConsumer

The Message Consumer object.

Applies to

Session objects

Notes

See also

cancelDurableSubscription procedure, publish procedure, subscribe procedure

For more information, see the "Publishing messages to a topic" section, the "Subscribing to a topic" section, the "Durable subscriptions" section, and the "Methods unique to Pub/Sub messaging" section.

For an example, see the "Pub/Sub messaging example" section.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095